Optimal. Leaf size=300 \[ \frac {(8 A-12 B+19 C) \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{4 a^{3/2} d}-\frac {(5 A-9 B+13 C) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{2 \sqrt {2} a^{3/2} d}-\frac {(A-B+C) \sin (c+d x)}{2 d \cos ^{\frac {7}{2}}(c+d x) (a+a \sec (c+d x))^{3/2}}+\frac {(A-B+2 C) \sin (c+d x)}{2 a d \cos ^{\frac {5}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}-\frac {(2 A-6 B+7 C) \sin (c+d x)}{4 a d \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.67, antiderivative size = 300, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 8, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.178, Rules used = {4350, 4169,
4106, 4108, 3893, 212, 3886, 221} \begin {gather*} -\frac {(5 A-9 B+13 C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x) \sqrt {\sec (c+d x)}}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{2 \sqrt {2} a^{3/2} d}+\frac {(8 A-12 B+19 C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{4 a^{3/2} d}-\frac {(2 A-6 B+7 C) \sin (c+d x)}{4 a d \cos ^{\frac {3}{2}}(c+d x) \sqrt {a \sec (c+d x)+a}}+\frac {(A-B+2 C) \sin (c+d x)}{2 a d \cos ^{\frac {5}{2}}(c+d x) \sqrt {a \sec (c+d x)+a}}-\frac {(A-B+C) \sin (c+d x)}{2 d \cos ^{\frac {7}{2}}(c+d x) (a \sec (c+d x)+a)^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 221
Rule 3886
Rule 3893
Rule 4106
Rule 4108
Rule 4169
Rule 4350
Rubi steps
\begin {align*} \int \frac {A+B \sec (c+d x)+C \sec ^2(c+d x)}{\cos ^{\frac {5}{2}}(c+d x) (a+a \sec (c+d x))^{3/2}} \, dx &=\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sec ^{\frac {5}{2}}(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx\\ &=-\frac {(A-B+C) \sin (c+d x)}{2 d \cos ^{\frac {7}{2}}(c+d x) (a+a \sec (c+d x))^{3/2}}+\frac {\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sec ^{\frac {5}{2}}(c+d x) \left (-\frac {1}{2} a (A-5 B+5 C)+2 a (A-B+2 C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{2 a^2}\\ &=-\frac {(A-B+C) \sin (c+d x)}{2 d \cos ^{\frac {7}{2}}(c+d x) (a+a \sec (c+d x))^{3/2}}+\frac {(A-B+2 C) \sin (c+d x)}{2 a d \cos ^{\frac {5}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}+\frac {\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sec ^{\frac {3}{2}}(c+d x) \left (3 a^2 (A-B+2 C)-a^2 (2 A-6 B+7 C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{4 a^3}\\ &=-\frac {(A-B+C) \sin (c+d x)}{2 d \cos ^{\frac {7}{2}}(c+d x) (a+a \sec (c+d x))^{3/2}}+\frac {(A-B+2 C) \sin (c+d x)}{2 a d \cos ^{\frac {5}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}-\frac {(2 A-6 B+7 C) \sin (c+d x)}{4 a d \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}+\frac {\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {\sec (c+d x)} \left (-\frac {1}{2} a^3 (2 A-6 B+7 C)+\frac {1}{2} a^3 (8 A-12 B+19 C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{4 a^4}\\ &=-\frac {(A-B+C) \sin (c+d x)}{2 d \cos ^{\frac {7}{2}}(c+d x) (a+a \sec (c+d x))^{3/2}}+\frac {(A-B+2 C) \sin (c+d x)}{2 a d \cos ^{\frac {5}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}-\frac {(2 A-6 B+7 C) \sin (c+d x)}{4 a d \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}-\frac {\left ((5 A-9 B+13 C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {\sec (c+d x)}}{\sqrt {a+a \sec (c+d x)}} \, dx}{4 a}+\frac {\left ((8 A-12 B+19 C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)} \, dx}{8 a^2}\\ &=-\frac {(A-B+C) \sin (c+d x)}{2 d \cos ^{\frac {7}{2}}(c+d x) (a+a \sec (c+d x))^{3/2}}+\frac {(A-B+2 C) \sin (c+d x)}{2 a d \cos ^{\frac {5}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}-\frac {(2 A-6 B+7 C) \sin (c+d x)}{4 a d \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}+\frac {\left ((5 A-9 B+13 C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,-\frac {a \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{2 a d}-\frac {\left ((8 A-12 B+19 C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1+\frac {x^2}{a}}} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{4 a^2 d}\\ &=\frac {(8 A-12 B+19 C) \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{4 a^{3/2} d}-\frac {(5 A-9 B+13 C) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{2 \sqrt {2} a^{3/2} d}-\frac {(A-B+C) \sin (c+d x)}{2 d \cos ^{\frac {7}{2}}(c+d x) (a+a \sec (c+d x))^{3/2}}+\frac {(A-B+2 C) \sin (c+d x)}{2 a d \cos ^{\frac {5}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}-\frac {(2 A-6 B+7 C) \sin (c+d x)}{4 a d \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.49, size = 239, normalized size = 0.80 \begin {gather*} -\frac {\cos ^3\left (\frac {1}{2} (c+d x)\right ) \sqrt {\cos (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (2 (5 A-9 B+13 C) \tanh ^{-1}\left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+\frac {\sqrt {2} (8 A-12 B+19 C) \tanh ^{-1}\left (\sqrt {2} \sin \left (\frac {1}{2} (c+d x)\right )\right ) \cos ^2\left (\frac {1}{2} (c+d x)\right )+\frac {1}{2} (-2 A+6 B-3 C+(8 B-6 C) \cos (c+d x)+(-2 A+6 B-7 C) \cos (2 (c+d x))) \sec ^2(c+d x) \sin \left (\frac {1}{2} (c+d x)\right )}{-1+\sin ^2\left (\frac {1}{2} (c+d x)\right )}\right )}{d (A+2 C+2 B \cos (c+d x)+A \cos (2 (c+d x))) (a (1+\sec (c+d x)))^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(730\) vs.
\(2(253)=506\).
time = 0.18, size = 731, normalized size = 2.44
method | result | size |
default | \(-\frac {\left (-1+\cos \left (d x +c \right )\right ) \sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (8 A \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (-1-\cos \left (d x +c \right )+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sqrt {2}\, \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right )+8 A \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sqrt {2}\, \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right )-12 B \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (-1-\cos \left (d x +c \right )+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sqrt {2}\, \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right )-12 B \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sqrt {2}\, \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right )+19 C \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (-1-\cos \left (d x +c \right )+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sqrt {2}\, \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right )+19 C \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sqrt {2}\, \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right )+4 A \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (\cos ^{3}\left (d x +c \right )\right )-20 A \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right )-12 B \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (\cos ^{3}\left (d x +c \right )\right )+36 B \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right )+14 C \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (\cos ^{3}\left (d x +c \right )\right )-52 C \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right )-4 A \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (\cos ^{2}\left (d x +c \right )\right )+4 B \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (\cos ^{2}\left (d x +c \right )\right )-8 C \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (\cos ^{2}\left (d x +c \right )\right )+8 B \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \cos \left (d x +c \right )-10 C \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \cos \left (d x +c \right )+4 C \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\right )}{8 d \,a^{2} \sin \left (d x +c \right )^{3} \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \cos \left (d x +c \right )^{\frac {3}{2}}}\) | \(731\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 15483 vs.
\(2 (253) = 506\).
time = 2.14, size = 15483, normalized size = 51.61 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.77, size = 808, normalized size = 2.69 \begin {gather*} \left [\frac {2 \, \sqrt {2} {\left ({\left (5 \, A - 9 \, B + 13 \, C\right )} \cos \left (d x + c\right )^{4} + 2 \, {\left (5 \, A - 9 \, B + 13 \, C\right )} \cos \left (d x + c\right )^{3} + {\left (5 \, A - 9 \, B + 13 \, C\right )} \cos \left (d x + c\right )^{2}\right )} \sqrt {a} \log \left (-\frac {a \cos \left (d x + c\right )^{2} + 2 \, \sqrt {2} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - 2 \, a \cos \left (d x + c\right ) - 3 \, a}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) - 4 \, {\left ({\left (2 \, A - 6 \, B + 7 \, C\right )} \cos \left (d x + c\right )^{2} - {\left (4 \, B - 3 \, C\right )} \cos \left (d x + c\right ) - 2 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) + {\left ({\left (8 \, A - 12 \, B + 19 \, C\right )} \cos \left (d x + c\right )^{4} + 2 \, {\left (8 \, A - 12 \, B + 19 \, C\right )} \cos \left (d x + c\right )^{3} + {\left (8 \, A - 12 \, B + 19 \, C\right )} \cos \left (d x + c\right )^{2}\right )} \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 4 \, \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} {\left (\cos \left (d x + c\right ) - 2\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - 7 \, a \cos \left (d x + c\right )^{2} + 8 \, a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}}\right )}{16 \, {\left (a^{2} d \cos \left (d x + c\right )^{4} + 2 \, a^{2} d \cos \left (d x + c\right )^{3} + a^{2} d \cos \left (d x + c\right )^{2}\right )}}, \frac {2 \, \sqrt {2} {\left ({\left (5 \, A - 9 \, B + 13 \, C\right )} \cos \left (d x + c\right )^{4} + 2 \, {\left (5 \, A - 9 \, B + 13 \, C\right )} \cos \left (d x + c\right )^{3} + {\left (5 \, A - 9 \, B + 13 \, C\right )} \cos \left (d x + c\right )^{2}\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {2} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )}}{a \sin \left (d x + c\right )}\right ) - 2 \, {\left ({\left (2 \, A - 6 \, B + 7 \, C\right )} \cos \left (d x + c\right )^{2} - {\left (4 \, B - 3 \, C\right )} \cos \left (d x + c\right ) - 2 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) + {\left ({\left (8 \, A - 12 \, B + 19 \, C\right )} \cos \left (d x + c\right )^{4} + 2 \, {\left (8 \, A - 12 \, B + 19 \, C\right )} \cos \left (d x + c\right )^{3} + {\left (8 \, A - 12 \, B + 19 \, C\right )} \cos \left (d x + c\right )^{2}\right )} \sqrt {-a} \arctan \left (\frac {2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{a \cos \left (d x + c\right )^{2} - a \cos \left (d x + c\right ) - 2 \, a}\right )}{8 \, {\left (a^{2} d \cos \left (d x + c\right )^{4} + 2 \, a^{2} d \cos \left (d x + c\right )^{3} + a^{2} d \cos \left (d x + c\right )^{2}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}}{{\cos \left (c+d\,x\right )}^{5/2}\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________